#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>

#define TRIANGLE_LENGTH 65

uint64_t triangle[TRIANGLE_LENGTH][TRIANGLE_LENGTH];

void prepare() {
    for(int y = 0; y < TRIANGLE_LENGTH; y++) {
        for(int x = 0; x <= y; x++) {
            if (y == 0 || y == TRIANGLE_LENGTH - 1) {
                triangle[y][x] = 1;
            } else {
                triangle[y][x] = triangle[y - 1][x - 1] + triangle[y - 1][x];
            }
        }
    }
}

uint64_t C(int n, int m) {
    return triangle[n][m];
}

uint64_t once(int bits) {
    if (bits == 1 || bits == 2) {
        return 1;
    }
    uint64_t count = bits - bits / 2;
    uint64_t result = 0;
    for (int i = 0; i < count; i++) {
        result += C(bits - 1, bits - i - 1);
    }
    return result;
}

int main(void) {
    prepare();
    while (1) {
        uint64_t num;
        if (scanf("%" SCNu64, &num) == EOF) { 
            break;
        }
        printf("%" PRIu64 "\n", once(num));
    }
    return 0;
}
